Conversation
…inLearnOfficial#523 ChainLearnOfficial#526 ChainLearnOfficial#521 - Separate health check readiness from Stellar dependency checks - /health/live: always 200 (liveness probe) - /health/ready: DB + Redis only, Stellar removed (readiness probe) - /health: full status including Stellar Horizon + Soroban RPC (monitoring) - Add getSorobanServer() accessor to StellarClient - Update README with three-tier health check documentation ChainLearnOfficial#522 - Optimise recommendation queries (6 queries -> <=3) - Implement getRecommendedCourses with merged user-context JOIN query - Peer collaborative signal collapsed to single subquery JOIN, cached 24h - Candidate courses + enrollment counts in one query via correlated subquery - Add migration 0006 with 3 missing indexes for recommendation query paths - Add GET /api/courses/recommended route with scoring and reason tags ChainLearnOfficial#523 - Make audit logging non-blocking with buffered writes - Replace fire-and-forget db.insert with AuditLogger class - In-memory buffer flushed periodically (AUDIT_FLUSH_INTERVAL_MS) or on capacity (AUDIT_BUFFER_SIZE); flushing guard prevents concurrent races - Timer is unref'd so it does not block clean process exit - stopAuditLogger() awaits final flush before DB connection closes - Add auth.login and auth.login_failed audit events to auth.service.ts - Add AUDIT_BUFFER_SIZE and AUDIT_FLUSH_INTERVAL_MS to config ChainLearnOfficial#526 - Fix TOCTOU race condition in deductCredits (negative balances) - Build admin module: adminGuard, types, service, controller, routes - deductCredits uses single atomic UPDATE...WHERE credits >= amount RETURNING eliminating the read-check-write gap that allowed negative balances - On zero rows: EXISTS check distinguishes 404 (no user) vs 422 (low balance) - grantCredits uses same single-statement pattern - adminGuard uses crypto.timingSafeEqual to prevent timing oracle attacks - Add ADMIN_API_KEY to config (min 32 chars, placeholder-rejected) - Both operations emit structured audit events and invalidate user cache
|
@TheHalalHunter Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #521, Closes #522, Closes #523, Closes #526
#521 - Separate health check readiness from Stellar dependency checks
#522 - Optimise recommendation queries (6 queries -> <=3)
#523 - Make audit logging non-blocking with buffered writes
capacity (AUDIT_BUFFER_SIZE); flushing guard prevents concurrent races
#526 - Fix TOCTOU race condition in deductCredits (negative balances)
eliminating the read-check-write gap that allowed negative balances